﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.IO;

namespace visualizadordicom.Aux_Forms
{
    public partial class testgraph : Form
    {
        public testgraph(string equipment)
        {
            // I still have work here !!!
            InitializeComponent();
            /*
            string currentdirectory = Directory.GetCurrentDirectory();
            string[] filePaths = Directory.GetFiles(currentdirectory.ToString(), "*.txt");
            string[] sfile = File.ReadAllLines(filePaths[file]);
            List<int> positions = new List<int>();
            
            int i = 0;
            string[] validrange;
            foreach (String equi in sfile) 
            {
                if(equi.Contains("#Equipamento:"))
                {
                    positions.Add(i);
                }
                i++;
            }

            if (equipment + 1 < positions.Count)
            {
                validrange = new string[positions[equipment + 1] - positions[equipment]];

                for (i = 0; i < positions[equipment + 1] - positions[equipment]; i++)
                    validrange[i] = sfile[positions[equipment] + i];


            }
            else 
            {
                validrange = new string[sfile.Length - positions[equipment]];
                for (i = 0; i < sfile.Length - positions[equipment]; i++)
                    validrange[i] = sfile[positions[equipment] + i];
            }


            i = 0;
            foreach (String temp in validrange)
                if (temp.Contains("#Teste:"))
                    i++;

            double[] data = new double[i];

           /*
            
            I'm here!!! I still need to draw a graph.
            */
    


        }

        private void button1_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
